<template>
    <div class="portal-web com-class" >
        <BaseHeader></BaseHeader>
        <!--<BaseFooter></BaseFooter>-->
        <div class="portal-web-view">
            <el-button @click="toPath('t1')">t1</el-button>
            <el-button @click="toPath('t2')">t2</el-button>
            <el-button @click="toPath('t3')">t3</el-button>

            <router-view></router-view>
        </div>
    </div>
</template>
<script>
    import BaseHeader from '../../components/BaseHeader/BaseHeader'
    // import BaseFooter from '../../components/BaseFooter/BaseFooter'
    export default {
        name: "portal-web",
        data(){
            return{
                num: 1,
                currentRoute:null,
            }
        },
        methods:{
            toPath(path) {
                this.$router.push(path);
            }
        },
        created(){},
        components:{
            BaseHeader,
            // BaseFooter,
        },
        mounted(){
            //this.initMap();
            
        },
        watch:{
            '$route':{
                handler(to, from){
                    console.log(`here is portal-web.vue`);
                    console.log('num', this.num++);
                    this.currentRoute = to.name;
                    //处理路由变化
                    console.log('to', to)
                    console.log('from', from)
                },
                deep:true,
            },
        },
        beforeDestroy(){

        },
        destroyed(){}
    }
</script>


<style lang="less" scoped>
    .portal-web{
        //默认设计图尺寸 11050*2160
        height: 100%;
        width: 100%;
        position: relative;
        .portal-web-view{
            position: absolute;
            top: .06rem;
            width: 100%;
            height: calc(100% - .06rem);
            background: @bg_color1;
        }
    }


</style>